////
////  BKResultZhuanYeViewController.m
////  baokaodaxue
////
////  Created by dangyangyang on 15/6/6.
////  Copyright (c) 2015年 宏图教育. All rights reserved.
////
//
//#import "BKResultZhuanYeViewController.h"
//#import "BKZhuanYeTableViewCell.h"
//#import <RACEXTScope.h>
//#import <ReactiveCocoa.h>
//#import "BKResultOfZhuanYeViewController.h"
//#import "BKZhuanYeViewModel.h"
//
//static NSString *zhuanye = @"zhuanye"
//;
//@interface BKResultZhuanYeViewController ()<UITableViewDelegate,UITableViewDataSource>
//@property (weak, nonatomic) IBOutlet UITableView *tableView;
//@property (weak, nonatomic) IBOutlet UITextField *searchTextField;
//
//@end
//
//@implementation BKResultZhuanYeViewController
//
//- (void)viewDidLoad {
//    [super viewDidLoad];
//    // Do any additional setup after loading the view from its nib.
//    
//    [_tableView registerNib:[UINib nibWithNibName:NSStringFromClass([BKZhuanYeTableViewCell class]) bundle:nil] forCellReuseIdentifier:zhuanye];
//    
//    [_tableView reloadData];
//    _searchTextField.layer.cornerRadius = 3;
//    _searchTextField.layer.borderColor = [[UIColor lightGrayColor] CGColor];
//    _searchTextField.layer.borderWidth = 1.3;
//}
//
//- (void)didReceiveMemoryWarning {
//    [super didReceiveMemoryWarning];
//    // Dispose of any resources that can be recreated.
//}
//
//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//
//    BKZhuanYeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:zhuanye];
//    
//    for (UIView *view in [cell.subView subviews]) {
//        [view removeFromSuperview];
//    }
//    [cell.major  setTitle:_dataArray[indexPath.section][@"name"] forState:UIControlStateNormal];
//    NSArray *dataArray = _dataArray[indexPath.section][@"major"];
//    CGFloat width = tableView.frame.size.width/2
//    ;
//    NSInteger num = [dataArray count];
//    cell.row = num;
//    for (int i=0; i<num; i++) {
//        UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, i*44, width, 44)];
//        
//        if (i%2==0) {
//            button.backgroundColor =  [UIColor colorWithRed:0.922 green:0.965 blue:0.980 alpha:1.000];
//        }else{
//        
//            button.backgroundColor = [UIColor clearColor];
//        }
//        
//        button.titleLabel.font = [UIFont systemFontOfSize:14];
//        
//        [button setTitle:dataArray[i][@"name"] forState:UIControlStateNormal];
//        [button setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
//        @weakify(self);
//        [[button rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
//            @strongify(self);
//        
//            [BKZhuanYeViewModel colleageWithZhuanYe:dataArray[i][@"name"] dq:nil fw:nil success:^(NSArray *dataDic) {
//                BKResultOfZhuanYeViewController *result = [[BKResultOfZhuanYeViewController alloc] initWithNibName:NSStringFromClass([BKResultOfZhuanYeViewController class]) bundle:nil];
//                result.zhuanye = dataArray[i][@"name"];
//                
//                result.dataDic = dataDic;
//                
//                [self.navigationController pushViewController:result animated:YES];
//
//            } failure:^(NSString *message) {
//                
//            }];
//        
//            
//            
//        }];
//        
//        
//        [cell.subView addSubview:button];
//        
//    }
//    
//    
//    return cell;
//}
//
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
//
//    NSArray *majorArray = _dataArray[indexPath.section][@"major"];
//    return [majorArray count]*44;
//}
//
//- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
//
//    return [_dataArray count];
//}
//
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
//
//    return 1;
//}
//
//- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
//
//    return [UIView new];
//}
//
//- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
//
//    return 10;
//    
//}
//- (IBAction)p_back:(id)sender {
//     [self.navigationController popViewControllerAnimated:YES];}
//
//
///*
//#pragma mark - Navigation
//
//// In a storyboard-based application, you will often want to do a little preparation before navigation
//- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
//    // Get the new view controller using [segue destinationViewController].
//    // Pass the selected object to the new view controller.
//}
//*/
//
//@end
